<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/common.css"/>
	</head>
	<body>
		<div class="content">
			<img class="logo" src="img/logo.jpg"/>
			<h1>需求表单(三维后期)</h1>
			<div class="underline"></div>
				
				<div class="time">
					<div class="input_25 fl">
						<span>输出尺寸:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
						<span id="works_size" class="border"></span>
					</div>
					
					<div class="input_25 fl ">
						<span>影片长度:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
						<span id="video_len" class="border"></span>
					</div>
					
					<div class="input_25 fl ">
						<span>影片版本:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
						<span id="video_ver" class="border"></span>
					</div>
					
					<div class="input_25 fl margin_b20">
						<span>制作预算:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
						<span id="budget" class="border"></span>
					</div>
					
					<div class="input_25 fl">
						<span>交片时间:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
						<span id="delivery_time" class="border"></span>
					</div>
					<div class="clear"></div>
				</div>
				<div class="space_14">
					<div class="fl">音乐要求（作曲，选曲）:</div>
					<div class="fl border" id="expand_music"></div>
					<div class="clear"></div>
				</div>
				<div class="space_14">
					<div class="fl">版权要求（范围、年限）:</div>
					<div class="fl border" id="expand_copyright"></div>
					<div class="clear"></div>
				</div>
				<div class="space_14">
					<div class="fl">配音:</div>
					<div class="fl border" id="expand_cv"></div>
					<div class="clear"></div>
				</div>
				
				<div class="space_14">
					<div class="fl">备注:</div>
					<div class="fl border" id="content_2"></div>
					<div class="clear"></div>
				</div>
				
				
				<div class=" fl">参考片:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
				<div id="file_upload" class="">
				</div>
				
				<br />
				<!--<input type="button" id="submit" value="提交需求" class="fr submit"/>-->
		
		</div>
		
		<script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			function GetArgsFromHref(sHref, sArgName){
			      var args    = sHref.split("?");
			      var retval = "";
			    
			      if(args[0] == sHref) /*参数为空*/
			      {
			           return retval; /*无需做任何处理*/
			      }  
			      var str = args[1];
			      args = str.split("&");
			      for(var i = 0; i < args.length; i ++)
			      {
			          str = args[i];
			          var arg = str.split("=");
			          if(arg.length <= 1) continue;
			          if(arg[0] == sArgName) retval = arg[1]; 
			      }
			      return retval;
			}
			
			var sn = GetArgsFromHref(window.location.href,'sn');
//			var _thisurl = "/insight20170612_supplier/app/index.php?g=&m=Index&a=detail";
			
			$.ajax({
				type:"post",
				url:'./app/index.php?m=public&a=detail',
				data:{'sn':sn},
				success:function(ret){
					var script = ret.detail.script;
					var video_len = ret.detail.video_len;
					var video_ver = ret.detail.video_ver;
					var budget = ret.detail.budget;
					var delivery_time = ret.detail.delivery_time;
					var file_upload = ret.detail.file.file_upload;
					$("#video_len").html(video_len);
					$("#video_ver").html(video_ver);
					$("#budget").html(budget);
					$("#delivery_time").html(delivery_time);
					
					$('#expand_music').html(ret.detail.expand_music)
					$('#expand_cv').html(ret.detail.expand_cv)
					$('#expand_copyright').html(ret.detail.expand_copyright)
					$('#content_2').html(ret.detail.content_2)
					$('#works_size').html(ret.detail.works_size)
					for(var i in file_upload){
						var j = i;
						j = Number(j)
						j = j+1
						html = ""+j+".<img class='' src='img/video.png'/><a href='."+file_upload[i].download+"' class='' style='margin-right:10px'>点击下载附件["+i+"]</a>";		
						$("#file_upload").append(html)
					}
				}
			});
		</script>
	</body>
</html>